name: GNU/Linux (X11) build

on:
  push:
  pull_request:
  workflow_dispatch:

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v3

    - name: install dependencies
      run: |
        sudo apt-get update
        sudo apt-get install libgl-dev libglu1-mesa-dev libx11-dev libxrandr-dev libxi-dev

    - name: generate makefile
      run: cmake -DCMAKE_BUILD_TYPE=Release .

    - name: build freeglut
      run: make

    - name: stage install
      run: DESTDIR=freeglut-instdir make install

    - uses: actions/upload-artifact@v3
      with:
        name: freeglut-instdir
        path: freeglut-instdir

# vi:ts=2 sts=2 sw=2 expandtab:
